home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / WWW / Library / Implementation / HTLex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-28  |  1.3 KB  |  65 lines

  1. /*                         LEXICAL ANALYSOR (MAINLY FOR CONFIG FILES)
  2.                                              
  3.  */
  4.  
  5. #ifndef HTLEX_H
  6. #define HTLEX_H
  7.  
  8. #ifndef HTUTILS_H
  9. #include "HTUtils.h"
  10. #endif /* HTUTILS_H */
  11.  
  12.  
  13. #ifdef SHORT_NAMES
  14. #define lex_verb        lex_verbose
  15. #endif /*SHORT_NAMES*/
  16.  
  17.  
  18. typedef enum {
  19.     LEX_NONE,           /* Internally used      */
  20.     LEX_EOF,            /* End of file          */
  21.     LEX_REC_SEP,        /* Record separator     */
  22.     LEX_FIELD_SEP,      /* Field separator      */
  23.     LEX_ITEM_SEP,       /* List item separator  */
  24.     LEX_OPEN_PAREN,     /* Group start tag      */
  25.     LEX_CLOSE_PAREN,    /* Group end tag        */
  26.     LEX_AT_SIGN,        /* Address qualifier    */
  27.     LEX_ALPH_STR,       /* Alphanumeric string  */
  28.     LEX_TMPL_STR        /* Template string      */
  29. } LexItem;
  30.  
  31. extern char lex_buffer[];       /* Read lexical string          */
  32. extern int lex_line;            /* Line number in source file   */
  33.  
  34. /*
  35.  
  36. Get Next Lexical Item
  37.  
  38.    If returns LEX_ALPH_STR or LEX_TMPL_STR the string is in global buffer lex_buffer.
  39.    
  40.  */
  41.  
  42. PUBLIC LexItem lex PARAMS((FILE * fp));
  43. /*
  44.  
  45. Push Back Latest Item
  46.  
  47.  */
  48.  
  49. PUBLIC void unlex PARAMS((LexItem lex_item));
  50. /*
  51.  
  52. Get the Name for Lexical Item
  53.  
  54.  */
  55.  
  56. PUBLIC char *lex_verbose PARAMS((LexItem lex_item));
  57. /*
  58.  
  59.  */
  60.  
  61. #endif /* not HTLEX_H */
  62. /*
  63.  
  64.    End of file HTLex.h.  */
  65.